<form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card" data-table-id="BaseTable">

    <div class="layui-card-body padding-left-40">

        <div class="layui-form-item label-required-prev">
            <div class="help-label"><b>{:lang('配置类型')}</b></div>
            <select class="layui-select"  disabled>
                <option value=''>{:lang('请选择')}</option>
                {foreach $types as  $code => $typeName}
                {if  $code  eq input('get.type')}
                <option selected value="{$code}">{$typeName}</option>
                {else}
                <option value="{$code}">{$typeName}</option>
                {/if}
                {/foreach}
            </select>
            <input maxlength="500" class="layui-input" type='hidden' name="type" value='{$type}' required >
            <p class="help-block">{:lang('请选择配置类型，数据创建后不能再次修改哦')} ~</p>
        </div>


        <div class="layui-form-item label-required-prev">
            <div class="help-label"><b>{:lang('服务类型')}</b></div>
            <select name="service" class="layui-select">
                <option value=''>{:lang('请选择')}</option>
                {foreach $services as $code => $title}
                {if isset($vo.service) and ($code eq $vo.service)}
                <option selected value="{$code}">{$title}</option>
                {else}
                <option value="{$code}">{$title}</option>
                {/if}
                {/foreach}
            </select>
            <p class="help-block">{:lang('请选择服务类型，数据创建后不能再次修改哦')} ~</p>
        </div>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>{:lang('配置编码')}</b></span>
            {if isset($vo.code)}
            <input readonly maxlength="100" class="layui-input think-bg-gray" name="code" value='{$vo.code|default=""}' required required-error="{:lang('配置编码不能为空')}" placeholder="{:lang('请输入数据编码')}">
            {else}
            <input maxlength="100" class="layui-input" name="code" value='{$vo.code|default=""}' required vali-name="{:lang('配置编码')}" placeholder="{:lang('请输入配置编码')}">
            {/if}
            <span class="help-block">{:lang('请输入新的配置编码，数据创建后不能再次修改，同种数据类型的数据编码不能出现重复')} ~</span>
        </label>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>{:lang('配置名称')}</b></span>
            <input maxlength="500" class="layui-input" name="name" value='{$vo.name|default=""}' required vali-name="{:lang('配置名称')}" placeholder="{:lang('请输入配置名称')}">
            <span class="help-block">{:lang('请输入当前配置名称，请尽量保持名称的唯一性，数据名称尽量不要出现重复')} ~</span>
        </label>
        <label class="layui-form-item relative block">
            <span class="help-label"><b>{:lang('排序')}</b></span>
            <input  type="number" class="layui-input" name="sort" value='{$vo.sort|default=0}'  placeholder="{:lang('请输入序号')}">
            <span class="help-block">{:lang('请输入序号')} ~</span>
        </label>
        <label class="layui-form-item relative block">
            <span class="help-label"><b>{:lang('备注')}</b></span>
            <textarea name="note" class="layui-textarea" placeholder="{:lang('请输入备注')}">{$vo.note|default=''}</textarea>
        </label>

    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>{:lang('保存数据')}</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="{:lang('确定要取消编辑吗？')}" data-close>{:lang('取消编辑')}</button>
    </div>

</form>